/*
 * @Author: your name
 * @Date: 2020-03-08 14:39:34
 * @LastEditTime: 2020-03-14 15:05:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue-ele-env\src\api\RCIM\RCIM-addandstorage.js
 */
// 源、装置申报和查看
import request from '@/utils/request'
import { getToken } from '@/utils/auth'; // get token from cookie
import {
	formatePostParam
} from '@/utils'
// const BASE_URL = `http://localhost:9527/mock`
const BASE_URL = '';

// 源、装置申报界面
export function getDelarationList(query = {}) { // 许可证申报表格数据
	query.token = getToken();
    return request({
        url: `${BASE_URL}/DeclareNewRadLst.asmx/getEnterpriseDeclareNewRadLst`,
        method: `post`,
        params: query
    })
}

// 源、装置申报界面
export function reportType(query) { // 许可证申报表格数据
    return request({
        url: `${BASE_URL}/addandstorage/reportType`,
        method: `post`,
        params: query
    })
}

// 源、装置申报界面
export function reportDetial(query) { // 许可证申报表格数据
    return request({
        url: `${BASE_URL}/DeclareNewRadLst.asmx/getDeclareNewRadInfo`,
        method: `post`,
        params: query
    })
}

// // 源、装置申报界面
export function entDetial(query = {}) { // 许可证申报表格数据
	query.token = getToken();
    return request({
        url: `${BASE_URL}/DeclareEnterpirseInfoLst.asmx/GetEnterpriseInfo`,
        method: `post`,
        params: query
    })
}
// // 源、装置申报界面
export function InsertDeclareNewRad(query = {}) { // 许可证申报表格数据
	query.token = getToken();
	query = formatePostParam(query);
    return request({
        url: `${BASE_URL}/DeclareNewRadLst.asmx/InsertDeclareNewRad`,
        method: `post`,
        data: query
    })
}

// // 获取源用途
export function getRadUsed(query = {}) {
    return request({
        url: `${BASE_URL}/SystemDictionary.asmx/getRadUsed`,
        method: `post`,
        params: query
    })
}

// -----------------------------------------
// // 获取源用途
export function getDeclareNewRadsStatic(query = {}) {
    return request({
        url: `${BASE_URL}/DeclareNewRadLst.asmx/getDeclareNewRadsStatic`,
        method: `post`,
        params: query
    })
}

// // 获取详情
export function getDeclareNewRadsStaticDetail(query = {}) {
    return request({
        url: `${BASE_URL}/DeclareNewRadLst.asmx/getDeclareNewRadsStaticDetail`,
        method: `post`,
        params: query
    })
}
